package ai;
import java.awt.AWTException;
import java.awt.Robot;

public class MouseOper
{
	static void clickOn(Robot robot, int i, int j) throws Throwable
	{
		robot.mouseMove(i, j);
		robot.mousePress(16);
		Thread.sleep(500);
		robot.mouseRelease(16);
		Thread.sleep(1000);
	}
	
	public static void main(String [] args)
	{
		try
		{
			Robot robot = new Robot();
			for(int i = 0; i < 10; i++)
			{
				MouseOper.clickOn(robot, 10, 10);
			}
		}catch(AWTException e)
		{
			// TODO 自动生成的 catch 块
			e.printStackTrace();
		}catch(Throwable e)
		{
			// TODO 自动生成的 catch 块
			e.printStackTrace();
		}
	}
}
